import React, { Component } from 'react';
import {
    View,
    Text,
    StyleSheet,
    TouchableOpacity,
} from 'react-native';
export default class LoginButton extends Component{
    render() {
        //解构
        const { btnText } = this.props;
        const { login } = this.props;
        
        return (
            <View style={{ flex: 1 }}>
                <TouchableOpacity
                    style={styles.btn}
                    onPress={login}
                    color="#0074D9">
                    <Text style={styles.text}>{this.props.btnText}</Text>
                </TouchableOpacity>
            </View>
        );
    }

    
}

const styles = StyleSheet.create({

    btn: {
        flex: 1,
        alignItems: 'center',
        borderRadius: 10,
        backgroundColor: 'rgb(2,177,248)',
        justifyContent: 'center',
    },
    text: {
        fontSize: 18,
        color: '#fff',

    },

});